<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.jiadakeji.ppm.modules.sys.utils.*" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<script src="http://localhost:18000/CLodopfuncs.js?priority=0"></script>
	<script src="http://localhost:8000/CLodopfuncs.js?priority=1"></script>
	<object  id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
		<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
	</object>
	<script language="javascript" src="${ctxStatic}/lodop/LodopFuncs.js"></script>
	<title>应收台账管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					$("#btnSubmit").attr("disabled", "disabled");
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/business/feeCharge/">应收台账列表</a></li>
		<li class="active"><a href="${ctx}/business/feeCharge/form?id=${feeCharge.id}">应收台账收费</a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="feeCharge" action="${ctx}/business/feeCharge/payFeeChargeCash" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">小区：</label>
			<div class="controls">
				<form:input path="communityName" htmlEscape="false" maxlength="32" class="input-xlarge " readonly="true"/>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">楼栋：</label>
			<div class="controls">
				<form:input path="buildingName" htmlEscape="false" maxlength="32" class="input-xlarge " readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">房屋：</label>
			<div class="controls">
				<form:input path="room.code" htmlEscape="false" maxlength="32" class="input-xlarge " readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">缴费月份：</label>
			<div class="controls">
				<input name="feeMonth.currentMonth" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					   value="<fmt:formatDate value="${feeCharge.feeMonth.currentMonth}" pattern="yyyy-MM-dd"/>"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">物业管理费：</label>
			<div class="controls">
				<form:input path="manageFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">均摊电费：</label>
			<div class="controls">
				<form:input path="avgElecFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">均摊水费：</label>
			<div class="controls">
				<form:input path="avgWaterFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">二次加压送水用电费：</label>
			<div class="controls">
				<form:input path="secondPushElecFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">电梯费：</label>
			<div class="controls">
				<form:input path="elevatorFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">车辆费用：</label>
			<div class="controls">
				<form:input path="carMonthFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">总费用(不含违约金)：</label>
			<div class="controls">
				<form:input path="totalFee" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">发布时间：</label>
			<div class="controls">
				<input name="publishDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${feeCharge.publishDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">违约金开始收费时间：</label>
			<div class="controls">
				<input name="feebackBeginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${feeCharge.feebackBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">违约金费率：</label>
			<div class="controls">
				<form:input path="feebackRate" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">违约金：</label>
			<div class="controls">
				<form:input path="feebackMoney" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<%--<div class="control-group">
			<label class="control-label">状态：</label>
			<div class="controls">
				<form:input path="status" htmlEscape="false" maxlength="1" class="input-xlarge "/>
			</div>
		</div>--%>

		<div class="control-group">
			<label class="control-label">总应收费用：</label>
			<div class="controls">
				<form:input path="feeReceive.payAmount" htmlEscape="false" class="input-xlarge  number" readonly="true"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">缴费人：</label>
			<div class="controls">
				<form:select path="feeReceive.customerId" class="input-medium">
					<form:option value="${feecharge.room.houseHolderId}" label="${feecharge.room.houseHolder.name}"/>
					<form:option value="${feecharge.room.usingCustomerId}" label="${feecharge.room.usingCustomer.name}"/>

				</form:select>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">收费方式：</label>
			<div class="controls">
				<form:select path="feeReceive.type" class="input-medium">
					<form:options items="${fns:getDictList('fee_receive_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>
		<div class="form-actions">
			<input type="button" class="btn btn-warning" value="打印预览" onclick="MyPreview()">
			<shiro:hasPermission name="business:feeCharge:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="确 认 收 费"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>

<script language="javascript" type="text/javascript">
	var LODOP; //声明为全局变量

	function MyPreview() {
		AddTitle();
		LODOP.PREVIEW();
	};
	function AddTitle(){
		LODOP=getLodop();
		LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_不同高度幅面");
		LODOP.SET_PRINT_PAGESIZE(3,2400,200,"50");
		LODOP.ADD_PRINT_TEXT(19,278,163,30,"收  费  单  据");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",13);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(61,74,62,20,"缴费房屋:");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(62,149,100,20,$("#communityName").val());
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(62,259,100,20,$("#buildingName").val()+$("#room\\.code").val());
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(61,417,100,20,"收费单号:");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(283,365,84,20,"收费日期：");
		LODOP.ADD_PRINT_TEXT(283,472,80,20,"<fmt:formatDate value="<%=new java.util.Date()%>" pattern="yyyy-MM-dd"/>");
		LODOP.ADD_PRINT_LINE(80,148,80,246,0,1);
		LODOP.ADD_PRINT_LINE(80,257,80,361,0,1);
		LODOP.ADD_PRINT_LINE(80,530,80,668,0,1);
		LODOP.ADD_PRINT_TEXT(60,532,130,20,"12345678987654321");
		LODOP.ADD_PRINT_TEXT(105,84,75,20,"物业管理费:");
		LODOP.ADD_PRINT_TEXT(105,178,80,20,"￥"+formatCurrency($("#manageFee").val()));
		LODOP.ADD_PRINT_TEXT(105,299,80,20,"均摊电费:");
		LODOP.ADD_PRINT_TEXT(105,402,80,20,"￥"+formatCurrency($("#avgElecFee").val()));
		LODOP.ADD_PRINT_TEXT(105,511,80,20,"均摊水费：");
		LODOP.ADD_PRINT_TEXT(105,609,80,20,"￥"+formatCurrency($("#avgWaterFee").val()));
		LODOP.ADD_PRINT_TEXT(146,84,80,20,"二次加压送水用电费：");
		LODOP.ADD_PRINT_TEXT(146,175,80,20,"￥"+formatCurrency($("#secondPushElecFee").val()));
		LODOP.ADD_PRINT_TEXT(146,299,99,20,"电梯费：");
		LODOP.ADD_PRINT_TEXT(146,403,80,20,"￥"+formatCurrency($("#elevatorFee").val()));
		LODOP.ADD_PRINT_TEXT(146,511,92,20,"车辆费用：");
		LODOP.ADD_PRINT_TEXT(146,609,80,20,"￥"+formatCurrency($("#carMonthFee").val()));
		LODOP.ADD_PRINT_TEXT(189,84,80,20,"总应收费用：");
		LODOP.ADD_PRINT_TEXT(189,175,80,20,"￥"+formatCurrency($("#feeReceive\\.payAmount").val()));
		LODOP.ADD_PRINT_TEXT(189,511,80,20,"缴费月份：");
		LODOP.ADD_PRINT_TEXT(189,609,80,19,"<fmt:formatDate value="${feeCharge.feeMonth.currentMonth}" pattern="yyyy-MM"/>");
		LODOP.ADD_PRINT_TEXT(189,299,80,20,"违约金应收：");
		LODOP.ADD_PRINT_TEXT(189,402,80,20,"￥"+formatCurrency($("#feebackMoney").val()));
		LODOP.ADD_PRINT_TEXT(238,84,80,20,"收费备注：");
		LODOP.ADD_PRINT_TEXT(238,175,80,20,"物业缴费");
		LODOP.ADD_PRINT_LINE(124,172,124,262,0,1);
		LODOP.ADD_PRINT_TEXT(28,576,96,20,"金额单位：元");
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_LINE(124,403,124,486,0,1);
		LODOP.ADD_PRINT_LINE(124,602,124,691,0,1);
		LODOP.ADD_PRINT_LINE(164,176,164,262,0,1);
		LODOP.ADD_PRINT_LINE(164,404,164,486,0,1);
		LODOP.ADD_PRINT_LINE(164,608,164,694,0,1);
		LODOP.ADD_PRINT_LINE(208,173,208,260,0,1);
		LODOP.ADD_PRINT_LINE(208,402,208,490,0,1);
		LODOP.ADD_PRINT_LINE(208,607,208,695,0,1);
		LODOP.ADD_PRINT_LINE(258,173,258,261,0,1);
		LODOP.ADD_PRINT_LINE(324,80,324,690,0,1);
	};
	function formatCurrency(num) {
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
			cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
			num = num.substring(0,num.length-(4*i+3))+','+
					num.substring(num.length-(4*i+3));
		return (((sign)?'':'-') + num + '.' + cents);
	}
	function myDesign() {
		CreatePrintPage();
		LODOP.PRINT_DESIGN();
	};
	function CreatePrintPage() {


		LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_不同高度幅面");
		LODOP.SET_PRINT_PAGESIZE(3,2400,200,"50");
		LODOP.ADD_PRINT_TEXT(19,278,163,30,"收  费  单  据");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",13);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(61,74,62,20,"结算户:");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(62,149,100,20,"123456789");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(62,259,100,20," 韩 浩 宇");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_TEXT(61,417,100,20,"收费单号:");
		LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_LINE(96,75,96,689,0,1);
		LODOP.ADD_PRINT_TEXT(284,92,118,20,"余额是否计入账户：");
		LODOP.ADD_PRINT_TEXT(283,365,84,20,"收费日期：");
		LODOP.ADD_PRINT_TEXT(60,532,130,20,"12345678987654321");
		LODOP.ADD_PRINT_LINE(84,148,84,246,0,1);
		LODOP.ADD_PRINT_LINE(84,257,84,361,0,1);
		LODOP.ADD_PRINT_LINE(82,530,82,668,0,1);
		LODOP.ADD_PRINT_TEXT(105,84,75,20,"应收总计:");
		LODOP.ADD_PRINT_TEXT(105,299,80,20,"实收总计:");
		LODOP.ADD_PRINT_TEXT(105,511,80,20,"找赎总计：");
		LODOP.ADD_PRINT_TEXT(146,84,80,20,"现金收费：");
		LODOP.ADD_PRINT_TEXT(146,299,99,20,"原结算户余额：");
		LODOP.ADD_PRINT_TEXT(146,511,92,20,"新结算户余额：");
		LODOP.ADD_PRINT_TEXT(189,84,80,20,"电费应收：");
		LODOP.ADD_PRINT_TEXT(189,511,80,20,"电费月份：");
		LODOP.ADD_PRINT_TEXT(189,299,80,20,"违约金应收：");
		LODOP.ADD_PRINT_TEXT(238,84,80,20,"收费备注：");
		LODOP.ADD_PRINT_LINE(128,172,128,262,0,1);
		LODOP.ADD_PRINT_TEXT(105,178,80,20,"");
		LODOP.ADD_PRINT_TEXT(105,402,80,20,"新加文本32");
		LODOP.ADD_PRINT_TEXT(105,609,80,20,"新加文本33");
		LODOP.ADD_PRINT_TEXT(146,175,80,20,"新加文本34");
		LODOP.ADD_PRINT_TEXT(146,403,80,20,"新加文本35");
		LODOP.ADD_PRINT_TEXT(146,609,80,20,"新加文本36");
		LODOP.ADD_PRINT_TEXT(189,175,80,20,"新加文本37");
		LODOP.ADD_PRINT_TEXT(189,402,80,20,"新加文本38");
		LODOP.ADD_PRINT_TEXT(189,609,80,19,"新加文本39");
		LODOP.ADD_PRINT_TEXT(238,175,80,20,"新加文本40");
		LODOP.ADD_PRINT_TEXT(28,576,96,20,"金额单位：元");
		LODOP.SET_PRINT_STYLEA(0,"Bold",1);
		LODOP.ADD_PRINT_LINE(128,403,128,486,0,1);
		LODOP.ADD_PRINT_LINE(128,602,128,691,0,1);
		LODOP.ADD_PRINT_LINE(168,176,168,262,0,1);
		LODOP.ADD_PRINT_LINE(168,404,168,486,0,1);
		LODOP.ADD_PRINT_LINE(168,608,168,694,0,1);
		LODOP.ADD_PRINT_LINE(212,173,212,260,0,1);
		LODOP.ADD_PRINT_LINE(212,402,212,490,0,1);
		LODOP.ADD_PRINT_LINE(212,607,212,695,0,1);
		LODOP.ADD_PRINT_LINE(262,173,262,261,0,1);
		LODOP.ADD_PRINT_TEXT(284,224,80,20,"新加文本50");
		LODOP.ADD_PRINT_TEXT(283,472,80,20,"新加文本51");
		LODOP.ADD_PRINT_LINE(324,80,324,690,0,1);

	};
</script>
</body>
</html>